package client.view;

import java.awt.event.ActionEvent;
import java.io.IOException;

import javax.swing.AbstractAction;

public class LobbyChatAction extends AbstractAction {

	private MasterServerView msv;
	public LobbyChatAction(MasterServerView msv) {
		this.msv=msv;
	}
	public void actionPerformed(ActionEvent arg0) {
		try {
		msv.getClient().sendLobbyMessage(msv.getChatPane().getMessage());
		} catch (IOException ioe) {
			ioe.printStackTrace(); 
		}
		finally {
			msv.getChatPane().clearMessage();
		}
	}

}
